<!--
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="”viewport”" content="”width=device-width;" user-scalable="0;”" maximum-scale="1.0;" initial-scale="1.0;">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<title>更新信息</title>
</head>
<body>
<h1> 更新信息</h1>
 
 <form action="/userInfo/bind.htm" method="post">
 	Personal information: <br>
 	<label><input name="userSex" type="radio" value="1" <#if user.userSex == '1'> checked=true </#if>  />Mr. </label> 
	<label><input name="userSex" type="radio" value="2" <#if user.userSex == '2'> checked=true </#if> />Ms. </label>  <br>
 	first Name:<input type="text" name="userFirstName" id="" value="${user.userFirstName}" length=16 />  <br>
 	last Name:<input type="text" name="userLastName" id="" value="${user.userLastName}" length=16 /> <br>
 	cur Employer:<input type="text" name="userEmployer" id="" value="${user.userEmployer}"  length=16 /> <br>
 	JobTitle:<input type="text" name="userJob" id="" value="${user.userJob}"  length=16 /> <br>
 	email:<input type="text" name="userEmail" id="" value="${user.userEmail}"  length=16 /> 变更邮箱后，需要重新激活用户！<br>
 	 location:<input type="text" name="userLocation" value="${user.userLocation}"  id="" length=16 /> <br>
 	 <input type="hidden" name="operate" value="update" />
 	<input type="submit" value="更新" />
</form>
</body>
</html>


-->

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <!-- 这是个iphone设备中的safari私有meta标签，它表示：允许全屏模式浏览；-->
    <meta content="yes" name="apple-mobile-web-app-capable">
    <!-- 全屏显示-->
    <meta name="apple-touch-fullscreen" content="yes">
    <!-- 不要让设备识别电话号码和邮箱地址-->
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
    <!-- DNS预解析-->
    <meta http-equiv="x-dns-prefetch-control" content="on">
    <link href="/static/css/common/reset.css" rel="stylesheet">
    <link href="/static/css/common/common.css" rel="stylesheet">
    <link href="/static/css/index.css" rel="stylesheet">
    
    <title> </title>
    <style>

    </style>
  </head>
  <body>
  	 <div class="registr">
  	<#if user ?if_exists>
  		<form action="../userInfo/bind.htm" method="post" id="form">
  		<input type="hidden" name="token" value="${token}" />
		 <input type="hidden"  name="id" value="${user.id}" >
		 <input type="hidden" name="operate" value="update" />
	   
        <img class="logo aligncenter" src="/static/img/logo.png" alt="">
		
        <h4>账户信息Account Information</h4>
			
        <input type="text" placeholder="账户名称 Account Name" name="userAcount" value="${user.userAcount}"  readonly>
        <h4>个人信息Personal Information</h4>
        <p class="h_box"><label for="a" class="flex_1"><input id="a" type="radio" placeholder="Account Name" value="1" <#if user.userSex == 1> checked=true </#if> name="userSex" > Mr.</label><label for="b" class="flex_1"><input id="b"  <#if user.userSex == '2'> checked=true </#if>  type="radio" placeholder="Account Name" value="2"  name="userSex"> Ms.</label></p>
        <input type="text" placeholder="名 First Name" name="userFirstName" id="userFirstName" value="${user.userFirstName}" maxlength="50" >
        <input type="text" placeholder="姓 Last Name" name="userLastName" id="userLastName" value="${user.userLastName}" maxlength="50">
        <input type="text" placeholder="公司 Company" name="userEmployer" id="userEmployer" value="${user.userEmployer}" maxlength="150">
        <input type="text" placeholder="职位 Job Title"  name="userJob" id="userJob" value="${user.userJob}" maxlength=50"">
        <input type="text" placeholder="行业 Industry"  name="userIndustry" id="userIndustry" value="${user.userIndustry}" maxlength=50"">
        <input type="text" placeholder="邮箱 Email"  name="userEmail" id="userEmail" value="${user.userEmail}"  readonly >
        <input type="text" placeholder="所在地 Base Location" name="userLocation" id="userLocation" value="${user.userLocation} "  maxlength="150">
   
		 </form>
		 <br>
		   </div>
    <button class="btn" onclick="submit();" id="submitBtn">修改 Edit</button>
    
   
  	<#else>
  		用户不存在
  	</#if>

 
	<!--提示框-->
	<script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="/static/js/jquery.tips.js"></script>
    <script src="/static/js/remset.js"></script>
    <script src="/static/js/zepto-1.1.4.min.js" type="text/javascript"></script>
   <script   type="text/javascript">
    	function submit(){
    		
    		if($("#userFirstName").val()==""){
				$("#userFirstName").tips({
					side:3,
		            msg:'please input First Name',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userFirstName").focus();
			return false;
			}
    		if($("#userLastName").val()==""){
				$("#userLastName").tips({
					side:3,
		            msg:'please input Last Name',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userLastName").focus();
			return false;
			}
    		if($("#userEmployer").val()==""){
				$("#userEmployer").tips({
					side:3,
		            msg:'please input Current Employer',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userEmployer").focus();
			return false;
			}
    		if($("#userJob").val()==""){
				$("#userJob").tips({
					side:3,
		            msg:'please input Job Title',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userJob").focus();
			return false;
			}
    		if($("#userIndustry").val()==""){
				$("#userIndustry").tips({
					side:3,
		            msg:'please input userIndustry',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userIndustry").focus();
			return false;
			}
    		if($("#userEmail").val()==""){
				$("#userEmail").tips({
					side:3,
		            msg:'please input Email',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userEmail").focus();
			return false;
			}
    		if(!isEmail($("#userEmail").val())){
				$("#userEmail").tips({
					side:3,
		            msg:'please input valid Email',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userEmail").focus();
			return false;
			}
			 
    		if($("#userLocation").val()==""){
				$("#userLocation").tips({
					side:3,
		            msg:'please input Base Location',
		            bg:'#AE81FF',
		            time:2
		        });
				$("#userLocation").focus();
			return false;
			}
			 
			$("#submitBtn").attr({"disabled":"disabled"});
			$("#form").submit();
			
    	}
    	
    	function isEmail(str) {
			var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
			return reg.test(str);
		}
		function isMobile(str) {
			//			var reg = /^1[3|4|5|8][0-9]\d{4,8}$/; (^(\d{3,4}-)?\d{7,8})$|(13[0-9]{9})  
			var reg = /^(^(\d{3,4}-)?\d{7,8})$|(1\d{10})$/;
			return reg.test(str);
		}
		
		
		
		
    </script>
     

  </body>
</html>

